// Enesea system timer
// (c) jimon game studio

#ifndef JEH_ITIMER
#define JEH_ITIMER

#include "Config_Engine.h"
#include "jeTypes.h"
#include "jeSingleton.h"
#include "jeUnknown.h"

namespace je
{
	namespace core
	{
		//! Timer interface
		class ITimer:public je::jeUnknown
		{
		public:
			//! Destructor
			virtual ~ITimer()
			{
			}

			//! Get current in programm time
			virtual f64 GetTime() = 0;

			//! If we need to correct return time, +1 add 1 millisec to return time, -1 sub one millisec
			virtual void SetTimeCorrection(f64 Correction) = 0;
		};

		DECLARE_SINGLETON_E(JE_ENGINE_FUNCTION_API,JE_ENGINE_FUNCTION_CALL,Timer)
	}
}

#define JETIME64 je::core::GetTimer()->GetTime()
#define JETIME32 (f32)JETIME64
#define JETIME JETIME32


#endif
